Skip to content

fix: oversampled fine state when the blurring mask is padded - #358

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/psf-oversample-workspace
Jul 8, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/psf-oversample-workspace

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Follow-up fix to #355 (oversampled PSF convolution core), found by the phase-3 workspace tests (PyAutoLabs/autolens_workspace#232): when the mask sits close enough to the image edge that blurring_from(allow_padding=True) pads its output to a larger frame, _fine_state_from built the image and blurring masks on different frames and raised a broadcast error in ConvolverState.

The image mask is now embedded into the padded frame using the same symmetric, parity-preserving padding arithmetic as blurring_mask_2d_from. Symmetric padding preserves the row-major slim ordering of unmasked pixels, so the cached permutations and the original image mask (used to wrap outputs) remain valid.

API Changes

None — bug fix only, +62/−3 in convolver.py + tests.

Test Plan

  • New padded-scene delta-kernel identity unit test (fails on main, passes here).
  • Full suites: PyAutoArray 861, PyAutoGalaxy 944, PyAutoLens 335 against the branch.
  • Workspace-level: convolution_over_sampled.py four-surface FitImaging coverage + s=2 FFT/real-space parity (ships in the companion autolens_workspace_test PR behind this merge).

Validation checklist (--auto run)

  • Effective level: supervised · Gate: tests pass / smoke imaging-trio pass / review CLEAN / heart YELLOW (human-approved ship)
  • Human: merge, amend, or reject — then log the outcome

🤖 Generated with Claude Code

…llow-up)

Discovered by the phase-3 workspace tests (autolens_workspace#232): when the
mask sits close enough to the image edge that blurring_from(allow_padding=True)
pads its output to a larger frame, the fine-state geometry built the image and
blurring masks on different frames and raised a broadcast error (or would have
mis-scattered). The image mask is now embedded into the padded frame with the
same symmetric parity-preserving padding arithmetic; symmetric padding keeps
the row-major slim ordering, so the permutations and the original image mask
(used to wrap outputs) stay valid.

Adds a padded-scene delta-kernel identity unit test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 8, 2026
@Jammy2211
Jammy2211 merged commit 12d0dce into main Jul 8, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/psf-oversample-workspace branch August 25, 2026 18:16
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant